powered by
Convert bn.fit objects to grain objects and vice versa.
bn.fit
grain
# S3 method for grain as.bn.fit(x) # S3 method for bn.fit as.grain(x)
an object of class grain (for as.bn.fit) or bn.fit (for as.grain).
as.bn.fit
as.grain
An object of class grain (for as.grain) or bn.fit (for as.bn.fit).
library(gRain) a = bn.fit(hc(learning.test), learning.test) b = as.grain(a) c = as.bn.fit(b)
Run the code above in your browser using DataLab